#include "New.h"

typedef struct _PropertiesArr{
	struct TypeDescriptor * type;
	size_t size;
	size_t height;
	size_t width;
	void *data;
} _prop;

static void * prop_ctor (void * _self, va_list * app){
	_prop *self = _self;
	self->size = va_arg(* app,size_t);
	self->height = va_arg(* app,size_t);
	self->width = va_arg(* app,size_t);
	self->data = (void *)malloc (sizeof(self->size) * self->height * self->width);
	return self;
}
static void prop_dtor (void* _self){
	_prop *self = _self;
	free(self->data);
	free(self);
}

static const struct TypeDescriptor prop =
{
        sizeof(_prop),
        prop_ctor,
        prop_dtor,
};
void *access(_prop *ar,size_t x,size_t y);
void copy_ddarr(_prop *ar1, _prop *ar2, size_t startx, size_t starty);
void reload_ddarr(_prop *ar, int new_width, int new_height);